package wiki.kaizen.cloud.shiro.stateless.shiro;

import lombok.Getter;
import lombok.Setter;
import org.apache.shiro.authc.AuthenticationToken;
/**
 * StatelessToken令牌类
 * @author xeepoo
 * */
@Getter
public class StatelessToken implements AuthenticationToken {

    private static final long serialVersionUID = 1L;

    private final String userCode;

    private final String token;

    public StatelessToken(String userCode, String token){
        this.userCode = userCode;
        this.token = token;
    }

    @Override
    public Object getPrincipal() {
        return userCode;
    }

    @Override
    public Object getCredentials() {
        return token;
    }
}
